package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsName  string `form:"type:varchar(100)"`
	GoodsPrice string `form:"type:varchar(100)"`
	GoodsNum   int    `form:"type:int(100)"`
	UserId     int    `form:"type:int(10)"`
}

func (g *Goods) GoodsAdd(db *gorm.DB) error {
	return db.Create(g).Error
}
